using System.IO;
using System.Collections.Generic;
using System.Xml.Serialization;

namespace ScottLane.VideoInbox
{
    /// <summary>
    /// Represents a file that can be downloaded from the internet.
    /// </summary>
    public class Download
    {
        #region Constructors

        /// <summary>
        /// Initializes a new instance of the Download class.
        /// </summary>
        public Download()
        {
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="sourceUrl"></param>
        /// <param name="destinationFileName"></param>
        //public Download(string sourceUrl, string destinationFileName)
        //{
        //    _sourceUrl = sourceUrl;
        //    _destinationFileName = destinationFileName;
        //}

        #endregion

        #region Properties

        private string _sourceUrl;

        /// <summary>
        /// The source url to download from.
        /// </summary>
        public string SourceUrl
        {
            get { return _sourceUrl; }
            set { _sourceUrl = value; }
        }

        private string _destinationFileName;

        /// <summary>
        /// The destination file name to download to.
        /// </summary>
        public string DestinationFileName
        {
            get { return _destinationFileName; }
            set { _destinationFileName = value; }
        }

        /// <summary>
        /// Gets a value indicating whether the source file exists.
        /// </summary>
        [XmlIgnore]
        public bool SourceExists
        {
            get { return true; } // todo
        }

        /// <summary>
        /// Gets a value indicating whether the destination file exists.
        /// </summary>
        [XmlIgnore]
        public bool DestinationExists
        {
            get { return File.Exists(_destinationFileName); }
        }

        private List<Shortcut> _shortcuts;

        /// <summary>
        /// Gets or sets the shortcuts that must be made to the downloaded file.
        /// </summary>
        public List<Shortcut> Shortcuts
        {
            get { return _shortcuts; }
            set { _shortcuts = value; }
        }

        #endregion
    }
}
